
package com.qdu.servlet;

import com.qdu.entity.Admin;
import com.qdu.service.AdminService;
import com.qdu.service.impl.AdminServiceImpl;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author 24959
 */
@WebServlet("/gais")
public class GetAdminInfoServlet extends HttpServlet{
    AdminService as=new AdminServiceImpl();

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.setCharacterEncoding("utf-8");
        int Ano = Integer.parseInt(req.getParameter("Ano"));
        Admin admin=as.getAdminByAno(Ano);
        req.setAttribute("admin", admin);
        req.getRequestDispatcher("/adminJsp.jsp").forward(req, resp);
    }

    
    
}
